<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@page isELIgnored="false"%><!--解除被禁用的el表达式 --> 
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<jsp:include page="../inc.jsp" />

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<style type="text/css">
		table#formTb tr{
			height: 25px;
			border-bottom: 1px solid #d4d4d4;
			margin: 5px;
		}
		table#code tr{
			height: 25px;
			border-bottom: 1px solid #d4d4d4;
			margin: 5px;
		}
		
		table#formTb tr td:first-child{
			text-align: right;
		}	
		table#code tr td:first-child{
			text-align: right;
		}	
		table#formTb tr td{
			padding: 7px 3px;
		}
		table#code tr td{
			padding: 7px 3px;
		}
	</style>
	<script type="text/javascript">
		
	function selectPhoto(){
		$('#photo').click();
	}
	$(function(){
		$("#photo").change(function(e){
			this.name="photo";
			var file = e.target.files[0];
			//声明文件流对象
			var reader = new FileReader();
			//加载文件
			reader.onload = function(e){
				var img = $('#imgPhoto').attr("src",e.target.result);
			}
			reader.readAsDataURL(file);
		});
		
		
	});
		//获取短信验证码
		var si='';
		function getCode() {
			
			var mobile =$("#mobile");
			if(!mobile.textbox('isValid')){
				return false;
			}
			var m=mobile.textbox('getValue');
			$.ajax({
				type:'get',
				url:'${ctx}/sc/getMobileCode.coc?mobile='+m,
						dataType:'json',
						success:function(r){
							$.messager.alert('系统提示',r.msg,'info');
							if(r.is){
								$('#btn').linkbutton('disable');
								clearInterval(si);
								var i=60;
								 si=setInterval(function(){
									i--;
									$("#ft").html(i+"s重新获取");
									if(i==0){
										$("#ft").html("点击重新获取");
										clearInterval(si);
										$("#btn").linkbutton('enable');
									}
								}, 1000);
							}
						}
			});
				
		}
		 /* $(function(){
			 $('#cc').combo({    
				    required:true,    
				    multiple:true,
				    panelWidth:250,
				    panelHeight:300
				}); 
			$('#code').appendTo($('#cc').combo('panel'));  //将下拉区块添加到下拉框里
		 }); */
	</script>
	<form id="dataForm" enctype="multipart/form-data"><!-- 允许文件的上传 -->
		<div id="tt" class="easyui-tabs" fit:true border=false>   
		    <div title="基本信息" style="padding:0px;display:none;">   
		        <table id="formTb" width="100%">
		        	<tr height="130px">
		        	
						<th align="center" colspan="2" style="padding:5px">
							<img id="imgPhoto" alt="" 
							<c:if test="${not empty cc.id }">src="${ctx}/fc/getImg.coc?tname=t_coc_coc&tid=${cc.id }"</c:if>
		        			<c:if test="${empty cc.id }">src="${ctx }/img/i07.png"</c:if>
							style="width: 120px;height: 120px;
							border-radius: 120px;border:1px solid #d4d4d4;
							cursor: pointer;" onclick="selectPhoto()"/>
							<input type="file" name="photo"
							id="photo" style="display: none" accept="image/jpeg,image/png"/>
								<!-- 隐藏域 -->
					<input type="hidden" name="id" value="${cc.id }" />
						</th>
						
					</tr>
				
					<tr>
						<td width="100px">商会名:</td>
						<td><!-- required:true 必填项 -->
							<input class="easyui-textbox" name="name" data-options="
								required:true,
							" value="${cc.name }">
						</td>
					</tr>
					<tr>
						<td>注册地:</td>
						<td>
							<input class="easyui-textbox" name="address" data-options="
								required:true,
							" value="${cc.address }">
						</td>
					</tr>
					<tr>
						<td>所属地:</td>
						<td>
							<input class="easyui-textbox" name="territory" value="${cc.territory}"/>
							
						</td>
					</tr>
					<tr>
						<td>注册时间:</td>
						<td>
							<input class="easyui-datebox" enable=false  name="time" value="${cc.time}">
						</td>
					</tr>
					<tr>
						<td>会长:</td>
						<td>
							<input class="easyui-textbox" name="president" value="${cc.president}"/>
							</td>
					</tr>
					<tr>
						<td>会长单位:</td>
						<td>
							<input class="easyui-textbox" name="presidentunit" value="${cc.presidentunit }"/>
						</td>
					</tr>
					<tr>
						<td>秘书长:</td>
						<td>
							<input class="easyui-textbox" name="secretargeneral" value="${cc.secretargeneral}"/>
						</td>
					</tr>
					<tr>
						<td>届次:</td>
						<td>
							<input class="easyui-textbox" name="sessio" value="${cc.sessio}"/>
						</td>
					</tr>
					<tr>
						<td>联系人:</td>
						<td>
							<input class="easyui-textbox" name="contacts"/>
						</td>
					</tr>
					<tr>
						<td>电话:</td>
						<td>
							<input class="easyui-textbox" name="phone"/>
						</td>
					</tr>
					</tr>
					<tr>
						<td>办公地:</td>
						<td>
							<input class="easyui-textbox" multiline=true name="officeaddress" style="height: 50px;width: 250px" >
						</td>
					</tr>
				</table>  
		    </div>   
		    <div title="拓展信息" data-options="closable:false" style="overflow:auto;padding:0px;display:none;">   
		        <table id="formTb" width="100%">
					<tr>
						<td width="100px">商会网站地址:</td>
						<td>
							<input id="ecc" class="easyui-textbox" name="cocweb" /> 
						</td>
					</tr>
					<tr>
						<td>微信公众号:</td>
						<td>
							<input class="easyui-textbox" name="wechataddress" style="height: 200px;width: 200px">
						</td>
					</tr>
					<tr>
						<td>商会介绍:</td>
						<td>
							<input class="easyui-textbox" name="cocintroduce" style="height: 300px;width: 400px">
						</td>
					</tr>
					<tr>
						<td>可用空间:</td>
						<td>
							<input class="easyui-textbox" name="availablespace" >
						</td>
					</tr>
				</table>    
		    </div>  
		    
		     
		</div> 
		
	</form>
	
		   <!--   <div>
    	<table id="code">
    		<tr>
    			<td>任职时间:</td>
    			<td>
    			<input class="easyui-datebox"  >
    			</td>
    			
    		</tr>
    		<tr>
    			<td>任职时间:</td>
    			<td>
    			<input class="easyui-datebox"  >
    			</td>
    		</tr>
    		<tr>
    			<td>届次:</td>
    			<td>
    				<input class="textbox" style="height:25px ">
    			</td>
    		</tr>
    		<tr>
    			<td>秘书长:</td>
    			<td>
    				<input class="textbox" style="height:25px ">
    			</td>
    		</tr>
       	<tr>
    			<td>任职时间:</td>
    			<td>
    			<input class="easyui-datebox"  >
    			</td>
    			
    		</tr>
    		<tr>
    			<td>任职时间:</td>
    			<td>
    			<input class="easyui-datebox"  >
    			</td>
    		</tr>
    		<tr>
    			<td>届次:</td>
    			<td>
    				<input class="textbox" style="height:25px ">
    			</td>
    		</tr>
    	</table>
    	
       
    </div> -->
</body>
</html>